package org.springframework.samples.mvc.basic.user;

import java.util.Arrays;
import java.util.List;

public class AuthenticationUser {

	private boolean enabled;
	private boolean credentialsExpired;
	private boolean accountLocked;
	private boolean accountExpired;
	private String username;
	private String password;
	private List<String> roles;

	public AuthenticationUser(boolean enabled, boolean credentialsExpired,
			boolean accountLocked, boolean accountExpired, String username,
			String password, String... roles) {
		super();
		this.enabled = enabled;
		this.credentialsExpired = credentialsExpired;
		this.accountLocked = accountLocked;
		this.accountExpired = accountExpired;
		this.username = username;
		this.password = password;
		this.roles = Arrays.asList(roles);
	}

	public boolean isEnabled() {
		return enabled;
	}
	
	public boolean isCredentialsExpired() {
		return credentialsExpired;
	}
	
	public boolean isAccountLocked() {
		return accountLocked;
	}
	
	public boolean isAccountExpired() {
		return accountExpired;
	}
	
	public String getUsername() {
		return username;
	}
	
	public String getPassword() {
		return password;
	}
	
	public List<String> getAuthorities() {
		return roles;
	}
}
